One of the keys to effective communication between different computer system components and sharing of computer resources is the use and handling of interrupt requests. Interrupt requests indicate that the requester, often a computer system component, requires some sort of attention or service. Interrupt requests as discussed herein include primarily hardware interrupt requests. Hardware interrupt requests occur as a result of an external event such as a request for service from an input/output (I/O) device.
The computer system responds to an interrupt request by invoking an interrupt service routine. The computer system must also use some sort of prioritization scheme if multiple interrupt requests are generated concurrently. Interrupt requests are generated for many different reasons from many different sources and require a variety of responses from the computer system. The computer system may have several interrupt service routines available, each having different capabilities. One interrupt service routine may always have complete system information so that the system can reliably be returned to the same state as before the interrupt request. Another interrupt service routine may not have complete system information, but it is able to service an interrupt very quickly. Thus, individual service routines may be better suited to handle certain types of interrupt requests.
Some computer systems also employ a variety of different modes in which the computer system may operate. A particular system mode may require its own software and have its own method of handling interrupts. An example of an alternative system mode with these characteristics is System Management Mode or SMM. SMM was developed by Intel Corporation of Santa Clara, Calif., the corporate assignee of the present invention.
In many cases, where a computer system makes use of a system mode that has its own interrupt service routine associated with it, the system designer or OEM must choose one interrupt service routine to service all interrupt requests from a particular source. The "source" in this case may be a particular bus in the computer system such that all interrupt requests passed on that bus must be serviced by the chosen interrupt service routine. The designer must choose the interrupt service routine that will service all of the interrupt requests from that source regardless of whether some interrupt request events might be better serviced with an alternate interrupt service routine.
In prior art systems using SMM, for example, system designers or OEMs choose one type of interrupt service routine to service all power management interrupt requests. Thus, even though a variety of different types of interrupt requests are generated, one interrupt service routine must be selected to handle all power management interrupt requests. Servicing all power management interrupt requests with one interrupt service routine has a number of drawbacks, all of which can lead to degradation of overall computer system performance.
A computer system employing SMM, for example, may service all power management interrupt requests with the system management interrupt (SMI) service routine. The SMI service routine has the advantages of being transparent to other applications running in the computer system and allowing for input/output (I/O) restarts, but switching into and out of SMM requires many computer cycles. Thus, if the SMI service routine is used to service all power management interrupt requests and the computer system must shift into and out of SMM frequently, the impact on computer system performance is significant. Additionally, the SMI service routine may not have all of the system information necessary to restore the system to its original state after servicing the interrupt.
Alternatively, if an operating system interrupt service routine, for example NMI (non-maskable interrupt) or INTR (maskable interrupt), is chosen to service all power management interrupt requests, the interrupts may interfere with other application events and cause applications to fail. Also, NMI and INTR do not provide for I/O (input/output device) restarts which are essential for effective power management.
Although a computer system using SMM and power management has been provided as an example, other prior art computer systems have similar issues with respect to handling interrupt requests. Prior art computer systems do not provide the system designer or OEM with the flexibility to select the interrupt service routine best able to service a particular interrupt request in all computer system modes.
The present invention provides for the selection of the interrupt service routine best able to handle a particular interrupt request. The present invention provides for the selection of the interrupt service routine for a particular interrupt request from any source, independent of the mode in which the computer system is operating.